package com.syj.collect.adapter;


import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentPagerAdapter;

import com.syj.collect.base.BaseFragment;

import java.util.List;


/**
 * created by XXX on 2021/2/27.
 */
public class MFragmentPagerAdapter extends FragmentPagerAdapter {
    private final List<BaseFragment> fList;
    String[] title={"全部","已提交","已审核","审核未通过"};

    public MFragmentPagerAdapter(FragmentManager fm, List<BaseFragment> fragmentList) {
        super(fm);
        this.fList = fragmentList;
    }

    @Override
    public Fragment getItem(int position) {
        return fList.get(position);
    }

    @Override
    public int getCount() {
        return fList.size();
    }

    @Nullable
    @Override
    public CharSequence getPageTitle(int position) {
        return title[position];
    }
}
